Fix some invalid DT property types#2891
Conversation
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/adc/lltc,ltc2387.yaml: ignoring, error in schema: properties: clocks: maxItems
Use correct description property for the clocks node.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/addac/adi,one-bit-adc-dac.yaml: ignoring, error in schema: properties: in-gpios: description
The description property is a string, not an array of strings.
Signed-off-by: David Lechner <dlechner@baylibre.com>
…property
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/adc/adi,adar1000.yaml: adi,phasetable-name: missing type definition
All vendor-specific properties need to have a type defined.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/adc/adi,ad9083.yaml: jesd204-top-device: missing type definition
Documentation/devicetree/bindings/iio/adc/adi,ad9083.yaml: jesd204-link-ids: missing type definition
All vendor-specific properties need to have a type defined.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/frequency/adf4371.yaml: adi,spi-3wire-enable: missing type definition
Documentation/devicetree/bindings/iio/frequency/adf4371.yaml: adi,muxout-level-1v8-enable: missing type definition
Documentation/devicetree/bindings/iio/frequency/adf4371.yaml: adi,output-enable: missing type definition
All vendor-specific properties need to have a type defined.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-mode: missing type definition
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-frm-buf-nr: missing type definition
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-distance: missing type definition
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-line-stride: missing type definition
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-frm-stride: missing type definition
Documentation/devicetree/bindings/media/adi,adi-axi-fb.yaml: adi,flock-dwidth: missing type definition
All vendor-specific properties need to have a type defined.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/clock/clk-ad9545.yaml: assigned-clock-phases: missing type definition
All vendor-specific properties need to have a type defined.
Signed-off-by: David Lechner <dlechner@baylibre.com>
…ties
Fix invalid binding found by:
$ dt-extract-properties -d Documentation/devicetree/bindings/
...
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,loop-filter-pfd-frequency-hz: multiple incompatible types: uint32
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,loop-filter-pfd-frequency-hz: multiple incompatible types: uint32-matrix
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,vco-minimum-frequency-hz: multiple incompatible types: uint32
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,vco-minimum-frequency-hz: multiple incompatible types: uint32-matrix
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,vco-maximum-frequency-hz: multiple incompatible types: uint32
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,vco-maximum-frequency-hz: multiple incompatible types: uint32-matrix
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,power-up-frequency-hz: multiple incompatible types: uint32
Documentation/devicetree/bindings/iio/frequency/adi,adf4360.yaml: adi,power-up-frequency-hz: multiple incompatible types: uint32-matrix
Properties don't use allOf: to define it's members.
Also fix all other dt_binding_check warnings in this file.
Signed-off-by: David Lechner <dlechner@baylibre.com>
Remove the $ref from the reg property that assigns a type to it. This is a standard property with type of "address", so assigning a different type causes a conflict and even causes the dtschema tool to crash when running `make dtbs_check`. Signed-off-by: David Lechner <dlechner@baylibre.com>
Drop unnecessary quotes around a couple of strings. This is the preferred style upstream. Signed-off-by: David Lechner <dlechner@baylibre.com>
a53dba4 to
bc633f0
Compare
Fix property types not matching the example or the kernel driver. Also fix a wrong name in required and remove an unspecified property in the example. Signed-off-by: David Lechner <dlechner@baylibre.com>
Fix bindings errors found by make dt_binding_check. Signed-off-by: David Lechner <dlechner@baylibre.com>
|
I added a few more commits to clean up some existing One thing I couldn't reproduce locally though is that the CI is failing with: I can't see anything wrong with this and it is happening in other files as well, so I think this could be an issue with CI in this case rather than an actual problem. |
@gastmaier something you can look up? |
Yes, any xilinx code we touch should be sent to them... I'm ok with merging it in the meantime though |
|
Hi @dlech and @nunojsa , dt-bindings/clock/ad9545.h doesn't exist on linux-next/master and this step checkouts this branch + the touched files. outputOn the other hand, if these fixes fix |
|
Running dt_binding_check on the commit range without checkout, results in the following outputs, without the tool crashing as before Let me know if we merge this and drop checking out, or merge the include checkout propesed in #2899 |
I think it would be best to check against the current branch instead of linux-next, otherwise anything that hasn't been upstreamed yet can't be validated. |
I don't see it on github yet, but I got an email that this patch has been applied to the xilinx tree. |
Ah, I just now saw the proposed solution and it is the best of both. 👍 |
gastmaier
left a comment
There was a problem hiding this comment.
LGTM, this solves the crash in dtschema@fixup_addresses python script todue to
# ...
# dac@0 {'compatible': ['adi,ad5413'], 'reg': [0], ... Ok
# compatible ['adi,ad5413'] Ok
# reg [0] Nok
while i < len(val):
^^^^^^^^
TypeError: object of type 'sized_int' has no len()
The issue happens here
dtschema/dtb.py#L512
Due to uint32 being added as a type to reg, {'uint32', 'address'}, while the correct is only {'address'},
PR Description
I was trying to run
make dtbs_checkon the ADI tree but it was causing the dtschma tool to crash. This lead me to devicetree-org/dt-schema#151 which lead me to runningdt-extract-props -d Documentation/devicetree/bindings/. This revealed quite a few errors. I fixed some things where it told me the actual file name where the problem was for things that are only in the ADI tree.The main one though is the last patch which fixes a problem likely from the upstream xilinx tree. I suppose we could submit that patch there, but I think it is important to fix it here ASAP so we can actually use
make dtbs_checkwithout crashing.PR Type
PR Checklist